﻿using FPSO.Models.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FPSO.Services
{
    public interface IInstructService
    {
        /// <summary>
        /// 添加指令日志信息
        /// </summary>
        /// <param name="insLog"></param>
        void AddInstructLog(InstructLog insLog);

        /// <summary>
        /// 更新指令日志信息
        /// </summary>
        /// <param name="insLog"></param>
        void UpdateInstructLog(InstructLog insLog);

        /// <summary>
        /// 获取正在执行的指令列表
        /// </summary>
        /// <returns></returns>
        List<InstructLog> GetActiveInstracts();

        /// <summary>
        /// 根据任务ID获取指令信息
        /// </summary>
        /// <param name="taskId">任务ID</param>
        /// <returns>指令日志</returns>
        InstructLog GetInstractByTaskId(int taskId);

        /// <summary>
        /// 根据指令日志ID获取指令信息
        /// </summary>
        /// <param name="insId">指令ID</param>
        /// <returns></returns>
        InstructLog GetInstractByInsId(int insId);
    }
}
